<!-- 
    @author Wójcik Karol <wojcikk@student.agh.edu.pl>
    @licence http://www.gnu.org/copyleft/gpl.html GNU/GPL
-->

<div id="colOne">
    <%= render :partial => "menu" %>
</div>
<div id="colTwo">
<% if @study_types.blank? %>
    <h1>Aktualnie nie ma dost&#281;pnych typ&#243;w studi&#243;w</h1>
<% else %>
<h1>Typy studi&#243;w</h1>
<table>
  <tr>
  <th>Nazwa</th>
  <th>Czy do pensum?</th>
  </tr>
 
<% for study_type in @study_types %>
  <tr>
  <td><%=h study_type.name %></td>
  <td><%=h study_type.ifpensum %></td>
    <td><%= link_to 'Poka&#380;', :action => 'show', :id => study_type %></td>
    <td><%= link_to 'Zmie&#324;', :action => 'edit', :id => study_type %></td>
    <td><%= link_to 'Usu&#324;', { :action => 'destroy', :id => study_type }, :confirm => 'Jeste&#347; pewny?', :post => true %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Poprzednia strona', { :page => @study_type_pages.current.previous } if @study_type_pages.current.previous %>
<%= link_to 'Nastepna strona', { :page => @study_type_pages.current.next } if @study_type_pages.current.next %> 

<br />
<% end %>
<%= link_to 'Utw&#243;rz nowy', :action => 'new' %>
</div>